Skip to main content

DescribeMetricRuleList

Description

call the DescribeMetricRuleList interface to query the alarm rule list.

Request Method

POST

Request Path

/apsara/route/cms/DescribeMetricRuleList

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
PageSizeBODYstringNo10The number of records displayed per page is 10 by default.
DimensionsBODYstringNo{"instanceId":"i-xy123****"}dimension map, which is used to query the monitoring data of specified resources. format key-value a collection of key-value pairs, commonly used key-value set as instanceId:XXXXXX. key and value has a length of 1~64 bytes, intercept the first 64 bytes when it exceeds 64 bytes. key and value can include letters, numbers, half-width periods (.), dashes (-), underscores (_), forward slashes (/), and backslashes (\). description Dimensions when passing in, a JSON string must be used to represent the Map object and must be passed in sequentially.
PageBODYstringNo1page number, the default is 1.
versionBODYstringNo2016-01-01version of api
NamespaceBODYstringNoacs_ecs_dashboardthe data namespace of the product. description for details, please refer to cloud product main monitoring items
AlertStateBODYstringNoALARMalarm rule status. Value: OK: normal ALARM: Alarm INSUFFICIENT_DATA: no data
GroupIdBODYstringNo123456application group ID.
MetricNameBODYstringNocpu_totalmonitoring item name. description for details, please refer to main monitoring items of cloud products .
regionIdBODYstringYesNo sample value for this parameter.region id
EnableStateBODYbooleanNotrueenabled state. Value: true: enable false: disable is empty by default, that is, rules for all states (including enable and disable).
RuleIdsBODYstringNoa151cd6023eacee2f0978e03863cc1697c8950812****alarm rule ID. description this parameter supports multiple queries at a time, and multiple IDs are separated by commas (,), with a maximum of 20 queries at a time.
RuleNameBODYstringNoECSCPU alarm rulesalarm rule name. Description This parameter supports fuzzy queries.

Return data

NameTypeSample valueDescription
GroupNamestringNo sample value for this parameter.application group name. Description If the alarm rule is associated with an application group, this parameter is displayed here.
NoEffectiveIntervalstringNo sample value for this parameter.The alarm rule does not take effect.
ComparisonOperatorstringNo sample value for this parameter.Warn level threshold comparator, optional values are as follows: GreaterThanOrEqualToThreshold: greater than or equal to GreaterThanThreshold: greater than LessThanOrEqualToThreshold: less than or equal to LessThanThreshold: less than NotEqualToThreshold: unequal GreaterThanYesterday: year-on-year increase yesterday LessThanYesterday: down from yesterday GreaterThanLastWeek: year-on-year increase at the same time last week LessThanLastWeek: year-on-year decrease at the same time last week GreaterThanLastPeriod: month-on-month increase LessThanLastPeriod: month-on-month decline
MailSubjectstringNo sample value for this parameter.alarm email subject definition.
MessagestringNo sample value for this parameter.error message.
RuleIdstringNo sample value for this parameter.alarm rule ID.
SourceTypestringNo sample value for this parameter.alarm rule type METRIC: time series indicator alarm rules EVENT: old version of event type alarm rules (obsolete)
CriticalnoneNo sample value for this parameter.Critical level alarm trigger condition.
SuccessbooleanNo sample value for this parameter.whether the request was successful.
WarnnoneNo sample value for this parameter.Warn level alarm trigger condition.
MetricNamestringNo sample value for this parameter.monitoring item name.
RuleNamestringNo sample value for this parameter.alarm rule name.
ThresholdstringNo sample value for this parameter.Warn level threshold.
ContactGroupsstringNo sample value for this parameter.alarm contact.
SilenceTimestringNo sample value for this parameter.channel silence period, in seconds. The default value is 86400 seconds (1 day) and the shortest is 3600 seconds (1 hour). When the monitoring data continuously exceeds the alarm rule threshold, only one alarm notification is sent in each silence period.
RequestIdstringNo sample value for this parameter.request ID.
AlarmsarrayNo sample value for this parameter.alarm rule list.
DimensionsstringNo sample value for this parameter.dimension map, which is used to query the monitoring data of specified resources. format key-value a collection of key-value pairs, commonly used key-value set as instanceId:XXXXXX. key and value has a length of 1~64 bytes, intercept the first 64 bytes when it exceeds 64 bytes. key and value can include letters, numbers, half-width periods (.), dashes (-), underscores (_), forward slashes (/), and backslashes (\). description Dimensions when passing in, a JSON string must be used to represent the Map object and must be passed in sequentially.
PeriodstringNo sample value for this parameter.statistical period.
EffectiveIntervalstringNo sample value for this parameter.the effective time period of the alarm rule.
InfononeNo sample value for this parameter.Info level alarm trigger condition.
CodeintegerNo sample value for this parameter.status code. description status code 200 indicates success.
StatisticsstringNo sample value for this parameter.Warn level alarm statistics method.
AlertStatestringNo sample value for this parameter.alarm rule status. Value: OK: normal ALARM: Alarm INSUFFICIENT_DATA: no data
NamespacestringNo sample value for this parameter.The data namespace of the product is used to distinguish different products.
GroupIdstringNo sample value for this parameter.application group ID.
TotalstringNo sample value for this parameter.total number of records.
AlarmnoneNo sample value for this parameter.alarm rule list.
TimesstringNo sample value for this parameter.Warn level continuous occurrence times, the alarm will be triggered only if the number of consecutive occurrences exceeds the threshold.
EnableStatebooleanNo sample value for this parameter.enabled state. Value: true: enable false: disable is empty by default, that is, rules for all states (including enable and disable).
EscalationsnoneNo sample value for this parameter.alarm level trigger condition.
WebhookstringNo sample value for this parameter.URL callback address.
ResourcesstringNo sample value for this parameter.resources associated with alarm rules.

Example

Successful Response example

"The successful response sample is not recognizable. Please modify API definition in API gateway before re-create the API document."

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}